Skip to content

Conversation

@EtienneLt
Copy link
Contributor

No description provided.

@EtienneLt EtienneLt self-assigned this Oct 6, 2025
return feederBayInfos;
}

private static TopologyInfos.TopologyInfosBuilder<?, ?> createDefaultTopologyInfosBuilder() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create an empty object nope ? This can return false data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ghazwarhili what do you think ?

int maxBusbarIndex = 1;
int maxSectionIndex = 1;
boolean busbarSectionPositionFound = true;
for (BusbarSection bbs : voltageLevel.getNodeBreakerView().getBusbarSections()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be nice to have a dedicated method for busbarSectionInfos

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it's not the purpose of the PR

}

@GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/topology", produces = APPLICATION_JSON_VALUE)
@Operation(summary = "Get topology description for a voltage level")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Get the voltage level topology description" or "Fetch the topology information for a voltage level"


@GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/topology", produces = APPLICATION_JSON_VALUE)
@Operation(summary = "Get topology description for a voltage level")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "topology description")})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description = "Network topology information retrieved"

private List<SwitchKind> switchKinds;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isRetrievedBusbarSections;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The attribute name isRetrievedBusbarSections is unclear and does not accurately reflect the data it represents,
so we decided to rename it.
I suggest isSymmetricalVoltageLevel or something else

private Boolean isRetrievedBusbarSections;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isBusbarSectionPositionFound;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isBusbarSectionPositionFound to isBusbarSectionPositionExtensionFound maybe ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isBusbarSectionPositionExtensionFound

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

private Boolean isBusbarSectionPositionFound;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Map<String, List<String>> busBarSectionInfos;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

busBarSectionInfos to busBarSectionsInfos

@sonarqubecloud
Copy link

private List<SwitchKind> switchKinds;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isRetrievedBusbarSections;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep the attributes

@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer busbarCount;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer sectionCount;

@JsonInclude(JsonInclude.Include.NON_NULL)
private List<SwitchKind> switchKinds;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isSymmetrical;

in the VoltageLevelFormInfos class, otherwise we break the voltage level creation and modification forms

"id": "VLNEW2",
"topologyKind": "BUS_BREAKER",
"substationId": "P1",
"nominalV": 225.0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this changes ?

@ghazwarhili
Copy link
Contributor

#303 I'd like to propose this PR for the refacto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants